package com.byedu.domain.course.vo;

import com.byedu.domain.course.AnswerDO;
import com.byedu.domain.course.UserQuestionDO;

import java.io.Serializable;

public class AnswerOnlyVO implements Serializable{

	private static final long serialVersionUID = -5999268134805615509L;

    /*答案编号*/
    private Integer id;
    /*选项*/
    private String subOption;
    /*选项内容*/
    private String content;

    public AnswerOnlyVO() {}

    public AnswerOnlyVO(AnswerDO answerDO, UserQuestionDO userQuestionDO) {
         this.id = answerDO.getId();
         this.subOption = answerDO.getSubOption();
         this.content = answerDO.getContent();
    }

    public AnswerOnlyVO(AnswerDO answerDO, boolean checked) {
        this.id = answerDO.getId();
        this.subOption = answerDO.getSubOption();
        this.content = answerDO.getContent();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getSubOption() {
        return subOption;
    }

    public void setSubOption(String subOption) {
        this.subOption = subOption;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }



    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AnswerOnlyVO answerVO = (AnswerOnlyVO) o;

        if (id != null ? !id.equals(answerVO.id) : answerVO.id != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return id != null ? id.hashCode() : 0;
    }

    @Override
    public String toString() {
        return "AnswerVO{" +
                "id=" + id +
                ", subOption=" + subOption +
                ", content='" + content + '\'' +
                '}';
    }
}
